var __extends =
    (this && this.__extends) ||
    (function () {
      var n = function (o, t) {
        return (n =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (n, o) {
              n.__proto__ = o;
            }) ||
          function (n, o) {
            for (var t in o)
              Object.prototype.hasOwnProperty.call(o, t) && (n[t] = o[t]);
          })(o, t);
      };
      return function (o, t) {
        function e() {
          this.constructor = o;
        }
        if ("function" != typeof t && null !== t)
          throw new TypeError(
            "Class extends value " + String(t) + " is not a constructor or null"
          );
        n(o, t),
          (o.prototype =
            null === t
              ? Object.create(t)
              : ((e.prototype = t.prototype), new e()));
      };
    })(),
  DropDownView = (function (n) {
    function o() {
      var o = n.call(this) || this;
      return (
        o.btn_dropDown_back.on(Laya.Event.CLICK, o, o.onDidClickCloseAction),
        o.btn_drop_chengyuanrenming.on(
          Laya.Event.CLICK,
          o,
          o.onPersonManagerAction
        ),
        o.btn_drop_kaichuchengyuan.on(
          Laya.Event.CLICK,
          o,
          o.onPersonManagerAction
        ),
        WebSocketService.addListener({
          caller: o,
          code: 1234,
          method: o.onLoadKaiChuData,
        }),
        o
      );
    }
    return (
      __extends(o, n),
      (o.openDropDownView = function (n) {
        return (
          null == this.ddview &&
            ((this.ddview = new o()), (this.ddview.zOrder = 1e3)),
          (this.ddview.jsonObj = n),
          this.ddview.popup(!0),
          (this.ddview.label_drop_content.text = n.n + "   在帮派中  " + n.t),
          this.ddview
        );
      }),
      (o.prototype.onPersonManagerAction = function (n) {
        if ("item_cyrm" == n.target.name)
          FactionMemberDialog.openMemberManView(this.jsonObj);
        else if ((n.target.name = "item_kccy")) {
          var o = "确定开除【" + this.jsonObj.n + "】所处帮派资格？";
          NormalDialog.showNormalDialog(o, this, this.onDidSureAction);
        }
      }),
      (o.prototype.onDidSureAction = function () {
        WebSocketService.send({
          c: 1234,
          d: { id: Global.bangpaiID, rid: this.jsonObj.id },
        });
      }),
      (o.prototype.onLoadKaiChuData = function (n) {
        0 == n.code &&
          (ToastView.toastView(n.msg),
          WebSocketService.send({
            c: 1218,
            d: { id: Global.bangpaiID, pageNum: 0 },
          }));
      }),
      (o.prototype.onDidClickCloseAction = function () {
        this.close();
      }),
      o
    );
  })(ui.FactionController.DropDownViewUI);
